import java.util.Arrays;
import java.util.List;

/**
 * @author Jiange
 * @create 2021-05-13-20:05
 */
public class StreamDemo {
    public static void main(String[] args) {
        User a = new User(18, "a", 1);
        User b = new User(28, "b", 2);
        User c = new User(38, "d", 3);
        User d = new User(48, "a", 4);
        List<User> list = Arrays.asList(a,b,c,d);
//        A a1 = (o,v)->{
//            System.out.println(o);
//            System.out.println(v);
//        };
//        a1.a("aaa",123);

        list.stream().filter(e->e.getAge()>28).map(e->e.getName().toUpperCase()).sorted(String::compareTo).forEach(System.out::println);
    }
}

interface A{
    public void a(String a,int v);
}
